package com.thesis.manage.common.constant;
import com.thesis.manage.common.entity.ExceptionLog;

/**
 * @author php
 * @date 2018/3/21
 */
public class EmailContent {
    public static StringBuilder context(String errorAcceptEmail, String applicationName, ExceptionLog exceptionLog) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("<p>");
        stringBuilder.append("    &nbsp; &nbsp;尊敬的").append(errorAcceptEmail).append("：<br/>");
        stringBuilder.append("</p>");
        stringBuilder.append("<p>");
        stringBuilder.append("    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 您好！<br/>");
        stringBuilder.append("</p>");
        stringBuilder.append("<p>");
        stringBuilder.append("    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 您管理的").append(applicationName).append("系统发生了如下异常：");
        stringBuilder.append("</p>");
        stringBuilder.append("<p>");
        stringBuilder.append("    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\'text-decoration: none; color: rgb(255, 0, 0);\'>").append(exceptionLog).append("</span>,");
        stringBuilder.append("</p>");
        stringBuilder.append("<p>");
        stringBuilder.append("    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 请尽快解决！");
        stringBuilder.append("</p>");
        stringBuilder.append("<p>");
        stringBuilder.append("    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 谢谢！<br/>");
        stringBuilder.append("</p>");
        stringBuilder.append("<p>");
        stringBuilder.append("    &nbsp; <br/>");
        stringBuilder.append("</p>");
        return stringBuilder;
    }
}
